/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.haiberg.osgi.bundle.httpdemo.activator;

import com.haiberg.osgi.bundle.httpdemo.tracker.HttpServiceTracker;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.util.tracker.ServiceTracker;

/**
 *
 * @author gyue
 */
public class Activator implements BundleActivator{

    ServiceTracker httpServiceTracker;
    @Override
    public void start(BundleContext bc) throws Exception {
        httpServiceTracker = new HttpServiceTracker(bc);
        httpServiceTracker.open();
    }

    @Override
    public void stop(BundleContext bc) throws Exception {
        httpServiceTracker.close();
        httpServiceTracker = null;
    }
    
}
